.article-editor {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-height: 100vh;
  position: relative;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid #e0e0e0;
  background: linear-gradient(to right, #f8f9fa, #ffffff);
  padding: 15px 25px;
  border-radius: 8px;
}

.editor-header h2 {
  font-size: 1.5rem;
  color: #333;
}

.action-buttons .btn {
  display: inline-block;
  width: 100px;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-weight: bold;
  transition: all 0.3s;
}

.action-buttons .btn:hover {
  opacity: 0.85;
}
.save-draft-btn {
  border: 1px solid #d9d9d9; /* 使用浅灰色边框 */
  color: #333333; /* 按钮文字改为深灰色 */
  background-color: #ffffff; /* 按钮填充颜色保持白色 */
  border-radius: 5px; /* 增加按钮圆角 */
  padding: 8px 16px; /* 添加适中的内边距 */
  font-size: 14px; /* 合理的字体大小 */
  cursor: pointer; /* 鼠标悬停增加手型指针 */
  transition: all 0.3s ease; /* 增加过渡效果 */
}

.save-draft-btn:hover {
  border-color: #999999; /* 悬停时边框加深 */
  background-color: #f5f5f5; /* 悬停时背景稍微变浅 */
}

.primary {
  background: #007bff;
  color: white;
  border: none;
  margin-left: 10px;
}

.editor-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 25px;
}

.form-section {
  background: white;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-item {
  margin-bottom: 18px;
}

.form-item label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: bold;
  color: #555;
}

input[type="text"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.5;
  background: #fcfcfc;
  transition: border-color 0.3s;
}

input[type="text"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #007bff;
}

.summary-input {
  height: auto;
  min-height: 300px;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.content-section {
  background: white;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.content-editor {
  width: 100%;
  height: auto; /* 保证编辑区的适配性 */
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  overflow: auto; /* 避免内容溢出 */
}

.content-editor:focus {
  border-color: #007bff;
}

.w-e-toolbar {
  display: flex;
  flex-wrap: wrap; /* 工具栏换行 */
  gap: 8px; /* 工具按钮的间距 */
  max-width: 100%;
  overflow: hidden; /* 隐藏溢出部分 */
}


.content-editor:focus {
  border-color: #007bff;
}

.image-preview-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45%, 1fr)); /* 每行展示2张 */
  gap: 16px; /* 图片间距 */
  justify-content: center; /* 居中对齐 */
  align-items: center; /* 垂直对齐 */
}

.image-preview-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
}

.image-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s;
}

.image-preview-wrapper:hover img {
  transform: scale(1.1);
}



@media (max-width: 768px) {
  .article-editor {
    margin: 10px;
    padding: 15px;
    border-radius: 8px;
  }

  .editor-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
}
@media (max-width: 576px) {
  .editor-main {
    grid-template-columns: 1fr;
    gap: 15px; /* 增加垂直间距保证阅读舒适度 */
    display: flex; /* 改用弹性盒布局 */
    flex-direction: column; /* 垂直排列 */
  }

  .form-section, .content-section {
    width: 100%;
    margin-bottom: 10px; /* 增加底部间距 */
    padding: 15px; /* 适当减少内边距 */
    box-sizing: border-box; /* 包含padding在宽度内 */
  }

  .content-section {
    order: -1; /* 让内容编辑器显示在上方（根据需求可选） */
    padding: 8px;
  }

  /* 编辑器核心样式调整 */
  .content-editor {
    font-size: 16px; /* 增大字体 */
    line-height: 1.8; /* 增加行距 */
    padding: 8px;
  }


}